﻿CREATE TABLE [dbo].[Doctor]
(
	[Id] INT NOT NULL PRIMARY KEY IDENTITY, 
    [BranchNo] NVARCHAR(50) NOT NULL, 
    [DoctorId] NVARCHAR(50) NOT NULL, 
    [DoctorName] NVARCHAR(50) NULL, 
    [DeptId] NVARCHAR(50) NOT NULL, 
    [Title] NVARCHAR(50) NULL, 
    [Fee] NVARCHAR(50) NULL, 
    [Gender] NVARCHAR(50) NULL, 
	[Desc] NTEXT NULL,
    [Sort] INT NULL, 
	[RecStatus] INT NOT NULL, 
    [RecCreateDt] DATETIME NOT NULL, 
    [RecUpdateDt] DATETIME NULL, 
    [RecDeleteDt] DATETIME NULL, 
    [FileName] NVARCHAR(50) NULL, 
    
)

GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生表',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = NULL,
    @level2name = NULL
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'主键，自增长',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = N'Id'
GO

GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'分院院内编码,无分院填0',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = 'BranchNo'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生院内编码',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = 'DoctorId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生名称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = 'DoctorName'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'部门院内编码',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = 'DeptId'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生职称',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = 'Title'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生性别：男、女',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = 'Gender'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'记录状态, 1：正常；2：删除',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = N'RecStatus'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'记录创建时间',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = N'RecCreateDt'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'记录上次修改时间',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = N'RecUpdateDt'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'记录删除时间',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = N'RecDeleteDt'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'排序',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = N'Sort'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生挂号费',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = 'Fee'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'医生简介（包括擅长内容）',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = N'Desc'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'头像文件名',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Doctor',
    @level2type = N'COLUMN',
    @level2name = N'FileName'